/* GUI CONVERTED from rcrsoupa.p (converter v1.75) Sat Aug 12 23:00:58 2000 */
/* rcrsoupa.p - Release Management Customer Schedules                        */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                       */
/* All rights reserved worldwide.  This is an unpublished work.              */
/*V8:ConvertMode=Maintenance                                                 */
/*V8:RunMode=Character,Windows                                               */
/* REVISION: 7.3      LAST MODIFIED: 08/13/93   BY: WUG *GB74*               */
/* REVISION: 7.3      LAST MODIFIED: 08/30/93   BY: WUG *GE19*               */
/* REVISION: 8.6      LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan        */
/* Old ECO marker removed, but no ECO header exists *F0PN*                   */
/* REVISION: 8.6E     LAST MODIFIED: 07/15/98   BY: *L024* B Reckard         */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00   BY: *N08T* Annasaheb Rahane  */
/* REVISION: 9.1      LAST MODIFIED: 07/27/00   BY: *N0GX* Phil DeRogatis    */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00   BY: *N0KP* myb               */

/* UPDATE REMOTE DATABASE SO HEADER RECORD SUBPROGRAM */

/*L024*/ {mfdeclre.i}
{gplabel.i} /* EXTERNAL LABEL INCLUDE */

         define shared frame hf_so_mstr.
/*L024*/ define shared temp-table tt_exru_usage like exru_usage.
/*L024*/ define variable o_seq like so_exru_seq no-undo.

         FORM /*GUI*/ 
            so_mstr
            except so_conrep so_inv_mthd
         with overlay frame hf_so_mstr THREE-D /*GUI*/.


         FORM /*GUI*/ 
            so_conrep format "x(40)"
            so_inv_mthd format "x(40)"
         with overlay frame hf_so_mstr THREE-D /*GUI*/.


/*N0GX   /* SET EXTERNAL LABELS */
*        setFrameLabels(frame hf_so_mstr:handle). */

         do with frame hf_so_mstr:
            find so_mstr where so_nbr = input so_nbr exclusive-lock no-error.

            if not available so_mstr then create so_mstr.
/*L024*/    else do:
/*L024*/       /* Delete associated exchange rate usage records */
/*L024*/       {gprunp.i "mcpl" "p" "mc-delete-ex-rate-usage"
                  "(input so_exru_seq)" }
/*L024*/    end.

            assign so_mstr.
            if recid (so_mstr) eq -1 then .

/*L024*/    /* This call to mccpexru will copy the temp table tt_exru_usage */
/*L024*/    /* to the exru_usage file for the current db */
/*L024*/    {gprun.i ""mccpexru.p"" "(output o_seq)" }
/*GUI*/ if global-beam-me-up then undo, leave.

/*L024*/    so_exru_seq = o_seq.
         end.
